package com.ten.teacher.feign;

import com.ten.common.core.entity.TbMember;
import com.ten.common.core.vo.Result;
import com.ten.teacher.factory.TbMemberFeignFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author ：Wqw
 * @date ：Created in 2022/11/19 15:30
 * @description：
 * @modified By：
 * @version:
 */
//value:调用远程微服务的名称
@FeignClient(value = "education-member",fallbackFactory = TbMemberFeignFactory.class)
@Repository
public interface TbMemberFeign {
    /**调用远程服务就像调用本地服务一样简单,创建接口，添加注解即可使用
     * 如果方法报错，有ProductFeignFactory返回信息
     * 提高微服务稳定性*/
    @PostMapping("/student/member/beTeacherByDeleted/{mobile}")
    public Result<TbMember> beTeacherByDeleted(@PathVariable String mobile );
}
